<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="/WEB-INF/pagination.tld" prefix="page"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>我制定的目标</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	
	<link href="<%=path %>/reference/css/Beike.css" rel="stylesheet" type="text/css">
	<link href="<%=path %>/reference/datePicker/skin/WdatePicker.css" rel="stylesheet" type="text/css"/>
	<script type="text/javascript" src="<%=path %>/reference/js/jquery.js"></script>
	<script src="<%=path %>/reference/WebCalendar.js" type="text/javascript"></script>
	<script type="text/javascript">
		//共享目标
	function sharcaiminfo(cid){
		 $.ajax({
				url:"${pageContext.request.contextPath}/beike/caiminfo.do?method=shareCaiminfo&cid="+cid,
				type:"post",
				dataType:"text",
				success:function(xml){
					alert("目标已共享！");
				}
			});
		
	}
	function deltarget(tid,ttype){
		if(window.confirm("确定要删除吗？")){
			window.location.href="<%=path %>/beike/targetmanager.do?method=delMyTarget&targetId="+tid+"&targetType="+ttype;
		}
	}
	</script>
  </head>
  
  <body>
<form action="<%=path %>/beike/targetmanager.do?method=getMyTargetSearch" name="frmss" method="post" id="frmss">
      <table width="100%" border="5" align="center" height="600px;" cellpadding="0" bordercolor="red" cellspacing="0" bgColor=#A0C8FA>
			<table width="100%" border="1" align="center" cellpadding="5" cellspacing="0">
	          <tr>
	            <td align="right" valign="middle" bgcolor="#FFFFFF">适用年龄：</td>
	            <td valign="middle" bgcolor="#FFFFFF">
	            	<select name="age"  style="width:100px; height:19px;">
						<option value="0">---请选择---</option>
						<option value="1" ${'1'==targetContent.age?'selected':'' }>0-1岁</option>
						<option value="2" ${'2'==targetContent.age?'selected':'' }>1-2岁</option>
						<option value="3" ${'3'==targetContent.age?'selected':'' }>2-3岁</option>
						<option value="4" ${'4'==targetContent.age?'selected':'' }>3-4岁</option>
						<option value="5" ${'5'==targetContent.age?'selected':'' }>4-5岁</option>
						<option value="6" ${'6'==targetContent.age?'selected':'' }>5-6岁</option>
						<option value="7" ${'7'==targetContent.age?'selected':'' }>6-7岁</option>
					</select>
	            </td>
	            <td align="right" valign="middle" bgcolor="#FFFFFF">目标类别：</td>
	            <td valign="middle" bgcolor="#FFFFFF">
	            	<select name="targetType"  style="width:100px; height:19px;">
	            		<option value="1" ${'1'==targetContent.targetType?'selected':'' }>集体目标</option>
	            		<option value="2" ${'2'==targetContent.targetType?'selected':'' }>个别目标</option>
	            	</select>
	            </td>
	             <td align="right" valign="middle" bgcolor="#FFFFFF">适用领域：</td>
	            <td valign="middle" bgcolor="#FFFFFF">
					<select name="areaId" style="width:100px; height:19px;">
						<option value='0'>---请选择---</option>
	            		<option value='1' ${'1'==targetContent.areaId?'selected':'' }>健康领域</option>
	            		<option value='2' ${'2'==targetContent.areaId?'selected':'' }>语言领域</option>
	            		<option value='3' ${'3'==targetContent.areaId?'selected':'' }>科学领域</option>
	            		<option value='4' ${'4'==targetContent.areaId?'selected':'' }>艺术领域</option>
	            		<option value='5' ${'5'==targetContent.areaId?'selected':'' }>社会领域</option>
	            		<option value='0'>-----------</option>
	            		<option value='6' ${'6'==targetContent.areaId?'selected':'' }>听觉训练</option>
	            		<option value='7' ${'7'==targetContent.areaId?'selected':'' }>发音训练</option>
	            		<option value='8' ${'8'==targetContent.areaId?'selected':'' }>语言学习</option>
	            		<option value='9' ${'9'==targetContent.areaId?'selected':'' }>交际训练</option>
	            		<option value='10' ${'10'==targetContent.areaId?'selected':'' }>认知强化</option>
	            		<option value='11' ${'11'==targetContent.areaId?'selected':'' }>语言矫治</option>
	            		<option value='12' ${'12'==targetContent.areaId?'selected':'' }>其他</option>
	            	</select>
				</td>
	           
			  </tr>
			  <tr>
	            <td valign="middle" bgcolor="#FFFFFF" align="right">目标属性：</td>
				<td valign="middle" bgcolor="#FFFFFF">自定义目标
					<input type="hidden" name="targetOption" value="1">
					<!--  select name="targetOption" style="width:100px; height:19px;">
						<option value="1" ${'1'==targetContent.targetOption?'selected':'' }>自定义目标</option>
	            		<option value="0" ${'0'==targetContent.targetOption?'selected':'' }>标准目标</option>	            		
	            	</select>-->
				</td>
	            <td align="right" valign="middle" bgcolor="#FFFFFF">制定人：</td>
	            <td valign="middle" bgcolor="#FFFFFF">${teacher.tname}<input type="hidden" name="teacherId" value="${teacher.teacherId }">
	            	<!--  select name="teacherId" style="width:100px; height:19px;">
	            		<c:forEach items="${teachers}" var="teach">
	            			<option value="${teach.teacherId }" ${teach.teacherId==targetContent.teacherId?'selected':'' }>${teach.tname }</option>
	            		</c:forEach>
	            	</select>-->
	            </td>
	            <td valign="middle" bgcolor="#FFFFFF" align="right">教学主题月选项：</td>
				<td valign="middle" bgcolor="#FFFFFF">
					<select name="month" style="width:100px; height:19px;">
						<option value='0'>---请选择---</option>
	            		<option value='1' ${'1'==targetContent.month?'selected':'' }>1  月</option>
	            		<option value='2' ${'2'==targetContent.month?'selected':'' }>2  月</option>
	            		<option value='3' ${'3'==targetContent.month?'selected':'' }>3  月</option>
	            		<option value='4' ${'4'==targetContent.month?'selected':'' }>4  月</option>
	            		<option value='5' ${'5'==targetContent.month?'selected':'' }>5  月</option>            		
	            		<option value='6' ${'6'==targetContent.month?'selected':'' }>6  月</option>
	            		<option value='7' ${'7'==targetContent.month?'selected':'' }>7  月</option>
	            		<option value='8' ${'8'==targetContent.month?'selected':'' }>8  月</option>
	            		<option value='9' ${'9'==targetContent.month?'selected':'' }>9  月</option>
	            		<option value='10' ${'10'==targetContent.month?'selected':'' }>10  月</option>
	            	</select>
				
				</td>
			  </tr>
			  <tr>
	            <td align="right" valign="middle" bgcolor="#FFFFFF">教学单元周选项：</td>
	            <td valign="middle" bgcolor="#FFFFFF">
	           		 <select name="week" style="width:100px; height:19px;">
						<option value='0'>---请选择---</option>
	            		<option value='1' ${'1'==targetContent.week?'selected':'' }>第一周</option>
	            		<option value='2' ${'2'==targetContent.week?'selected':'' }>第二周</option>
	            		<option value='3' ${'3'==targetContent.week?'selected':'' }>第三周</option>
	            		<option value='4' ${'4'==targetContent.week?'selected':'' }>第四周</option>
	            	</select>
				</td>
	            <td align="right" valign="middle" bgcolor="#FFFFFF">月教学主题名称：</td>
	            <td valign="middle" bgcolor="#FFFFFF"><input name="monthName" type="text" value="${targetContent.monthName }" class="boxCopy" id="monthName" style="width:100px; height:19px;"></td>
	            <td valign="middle" bgcolor="#FFFFFF" align="right">周教学单元名称：</td>
				<td valign="middle" bgcolor="#FFFFFF"><input name="weekName" type="text" value="${targetContent.weekName }" class="boxCopy" id="weekName" style="width:100px; height:19px;"></td>
			  </tr>
			  <tr>
	            <td align="right" valign="middle" bgcolor="#FFFFFF">开始时间：</td>
	            <td valign="middle" bgcolor="#FFFFFF"><input name="startTime" value="${targetContent.startTime }" type="text"  id="textfield" class="Wdate"  onClick="SelectDate(this,'yyyy-MM-dd')"  style="width:100px; height:19px;"></td>
	            <td align="right" valign="middle" bgcolor="#FFFFFF">结束时间：</td>
	            <td valign="middle" bgcolor="#FFFFFF"><input name="endTime" value="${targetContent.endTime }" type="text"  id="textfield2" class="Wdate"  onClick="SelectDate(this,'yyyy-MM-dd')"  style="width:100px; height:19px;"></td>
	            <td colspan="2" valign="middle" bgcolor="#FFFFFF" align="center"><a href="javascript:frmss.submit();"><img src="<%=path %>/reference/images/button_see.gif" alt="" width="44" height="20" border="0"></a></td>
			  </tr>
  </table>
  <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
      <td align="left"><table width="300" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td align="left"><table width="150" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td height="38" background="<%=path %>/reference/images/bq_011.gif" align="center"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td width="30" align="center"><img src="<%=path %>/reference/images/sm_05.gif" width="18" height="18" /></td>
                  <td align="left" class="title"><strong>我制定的目标</strong></td>
                </tr>
              </table></td>
              </tr>
          </table></td>
          </tr>
      </table></td>
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
          	<td><table width="100%"  align="center" cellpadding="0" cellspacing="0"  bgColor=#A0C8FA>
                <tr>
                  <td><table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#cfe5f5">
                    <tr>
                      <td height="25" bgcolor="#a4c9ec"><B>&nbsp;序号</B></td>
                      <td height="25" align="center" bgcolor="#a4c9ec"><B>目标名称</B></td>
                      <td height="25" align="center" bgcolor="#a4c9ec"><B>制定时间</B></td>
                      <td height="25" align="center" bgcolor="#a4c9ec"><B>制定人</B></td>
                      <td height="25" align="center" bgcolor="#a4c9ec"><B><strong>目标类别</strong></B></td>
                      <td height="25" align="center" bgcolor="#a4c9ec"><B>目标属性</B></td>
                      <c:if test="${'1'==targetContent.targetType}"><!-- 如果是个别目标则没有年龄选项 -->
                      <td height="25" align="center" bgcolor="#a4c9ec"><B>适用年龄</B></td>
                      </c:if>
                      <td height="25" align="center" bgcolor="#a4c9ec"><strong>收藏次数</strong></td>
                      <td align="center" bgcolor="#a4c9ec"><strong>删除</strong></td>	
                      <td align="center" bgcolor="#a4c9ec"><strong>编 辑</strong></td>	  
					  <td align="center" bgcolor="#a4c9ec"><strong>共 享</strong></td>
                    </tr>
                    <c:forEach items="${targets}" var="tgt" varStatus="staut">
                    <tr>
                      <td height="30" bgcolor="#FFFFFF">${staut.count+(currPage-1)*pageSize }.                        </td>
                      <td height="30" align="center" bgcolor="#FFFFFF">&nbsp;${tgt.targetName }</td>
                      <td width="13%" height="30" align="center" bgcolor="#FFFFFF">&nbsp;${tgt.ctime }</td>
                      <td width="10%" height="30" align="center" bgcolor="#FFFFFF">&nbsp;${tgt.teacherName }</td>
                      <td width="16%" height="30" align="center" bgcolor="#FFFFFF">&nbsp;${tgt.targetTypeName }</td>
					  <td width="16%" height="30" align="center" bgcolor="#FFFFFF">&nbsp;${tgt.targetOptionName }</td>
					  <c:if test="${'1'==targetContent.targetType}">
					  <td width="6%" height="30" align="center" bgcolor="#FFFFFF">&nbsp;${tgt.ageName }</td>
					  </c:if>
					  <td width="6%" height="30" align="center" bgcolor="#FFFFFF">&nbsp;${tgt.concount } 次</td>
					  <td width="6%" height="30" align="center" bgcolor="#FFFFFF"><img src="<%=path %>/reference/images/de.gif" alt="" width="16" onclick="deltarget(${tgt.targetId },${targetContent.targetType })"  height="16" border="0"></td>
                      <td width="6%" height="30" align="center" bgcolor="#FFFFFF"><img src="<%=path %>/reference/images/bianji.gif" width="16" height="16" border="0" onclick="window.parent.location.href='<%=path %>/beike/targetmanager.do?method=editMyTarget&targetId=${tgt.targetId }&targetType=${targetContent.targetType}&targetOption=${targetContent.targetOption}&month=${targetContent.month }&week=${targetContent.week }&areaId=${targetContent.areaId }';"></td>
                      <td width="6%" align="center" bgcolor="#FFFFFF"><img src="<%=path %>/reference/images/gongxiang.gif" onclick="if(window.confirm('确定要共享吗？')){ sharcaiminfo(${tgt.targetId });}" width="20" height="20" border="0"></td>
                    </tr>
                    </c:forEach>
                   </table></td>
                </tr>
              </table></td>
           </tr>
           <tr>
           <td><table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#FFFFFF">
                <tr>
                  <td bgcolor="#e6f0f8"><TABLE cellSpacing=0 cellPadding=3 width="100%" border=0>
                      <TBODY>
                        <TR>
                          <TD>&nbsp;</TD>
                          <TD align=right>
                              <page:Pagination url="${pageContext.request.contextPath}/beike/targetmanager.do?method=getMyTargetSearch" currPage="${empty currPage?1:currPage}" pageAmount="${pageAmount}" pageSize="${empty pageSize?5:pageSize}" type="post" form="frmss" />
				    	  </TD>
                        </TR>
                      </TBODY>
                  </TABLE></td>
                </tr>
              </table></td>
            
            </tr></table>
            </tr></table></table>
            </form>
  </body>
</html>
